home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / VideoToolbox 95.04.18 / Contents < prev    next >
Text File  |  1995-04-19  |  25KB  |  245 lines

  1. VideoToolbox: Contents
  2. April 18, 1995
  3.  
  4. CONTENTS OF THE VIDEOTOOLBOX DISK:
  5.  
  6. •Read me.
  7. •Contents-this file.
  8. •Changes & "Notes:Changes 1990-3"—chronological lists of additions and bug fixes.
  9. •Advice—list of books and software to help in programming vision experiments.
  10. •Portability-how to make your programs compatible with a wide range of Macs.
  11. •Video synch-explains how to synchronize a program to a video card.
  12. •Video bugs-lists known bugs in video drivers.
  13. •Video attenuator—ordering, installation, and upgrading instructions.
  14. •All.π, All.68k.µ, and All.ppc.µ are project files that allow you to browse through all the sources in the entire VideoToolbox disk, including demos and utilities. ".π" indicates a THINK C 7 project; ".µ" indicates a Metrowerks CodeWarrior C CW5 project. Double click the project to start up the appropriate compiler, then double click the name of any source file you want to examine.
  15. •Demos—a folder containing a variety of ready-to-run applications demonstrating various features of the VideoToolbox software. Sources are included. 
  16. •Notes—improvements to THINK C and Numerical Recipes, documentation for Luminance.c, "Changes 1990-3", and explanations of video and compiler arcana collected from various sources.
  17. •TimeVideo tests all of your computer's built-in video, video cards, and video drivers. Highly recommended. Works on all Macs. Just double-click it.
  18. •Utilities—a folder containing CalibrateLuminance and other useful ready-to-run projects.
  19. •VideoToolboxSources—a folder containing many useful subroutines. I suggest that you place an alias to the VideoToolbox folder (or at least the VideoToolboxSources folder) inside your THINK C "Aliases" folder. CodeWarrior users should add VideoToolboxSources to their project's access path. That will make it easy for your projects to access these routines without having to copy them into each of your project's folders. It will also make it much easier to update them, since all your programs will share the same copy.
  20.  
  21. CONTENTS OF Utilities FOLDER:
  22.  
  23. CalibrateLuminance helps you to measure the parameters of your video card, ISR Video Attenuator, and monitor. You will need a photometer. CalibrateLuminance will use a Data Translation FORERUNNER A/D card if you have one. All the results are stored in a "header" file called LuminanceRecord?.h, where ? stands for the screen number. You can then #include this file at compile time or ReadLuminanceRecord at run time in each of your programs that use that screen.
  24.  
  25. CheckContrast does a rigorous testing of the Pelli & Zhang (1991) algorithms that underlie the ISR Video attenuator and the Luminance.c software. You might find it useful if you want to test your ISR Video Attenuator and Luminance.c.
  26.  
  27. CVNetConvert, by Izumi Ozhawa, converts the address list available from the CVNet (i.e. Color and Vision email Network) Listserver to any of several formats, or you can define your own.
  28.  
  29. MeasureMTF measures your video monitor's Modulation Transfer Function, i.e. contrast gain as a function of spatial frequency.
  30.  
  31. Quick3 is a set of subroutines and a main program to fit psychometric functions. See: 
  32. Watson, A. B. (1979) Probability summation over time. Vision Res, 19, 515-22.
  33. Watson, A. B. and Pelli, D. G. (1983) QUEST: a Bayesian adaptive psychometric method. Percept Psychophys, 33 (2), 113-20.
  34.  
  35. The CricketGraph files are format files that should be moved into the folder in which your CricketGraph application resides. When you start up CricketGraph it will find and load all the format files, so that later, when you want to plot data, these formats will be available in CricketGraph's Format menu. (Sorry, they don't work with the new CricketGraph III.)
  36.  
  37. GetVideoDrivers and GetSlotDrivers copy all drivers into resource files, for subsequent perusal in ResEdit, in case you want to enhance SetEntriesQuickly to support a new video device. This is discussed in the "Video synch" file.
  38.  
  39. CONTENTS OF VideoToolboxSources FOLDER:
  40.  
  41. Assign.c is a portable runtime C interpreter that reads and executes any text "assignment" file that contains only C assignments and comments, e.g.
  42.     viewingDistance=57.0;    /* inches */
  43. It uses an array of "Description" structures to associate each name in the assignment file with a runtime C variable. It can also write an assignment file, making the assignment file a portable way of writing and reading calibrations and experimental parameters. Arrays can be allocated dynamically, automatically dimensioned so as to hold all the assignments in any part of the assignment file. Programs written before 1993, using the old ReadAssignments.c (superceded by Assign.c), may include the header file Assign92.h to minimize the effort of updating.
  44.  
  45. Binomial.c, given a binomial sample, returns a confidence interval for the underlying binomial probability.
  46.  
  47. BreakLines.c takes a long C string and judiciously changes spaces to '\n' to yield lines shorter than a specified lineLength.
  48.  
  49. CardSlot.c finds the first NuBus slot that contains a card of the given name. Returns -1 if there's no such card.
  50.  
  51. CenterRectInRect.c, shifts the first rect to center it in the second. OffsetRectTile and IsRectInRect are trivial but handy routines for playing with rects.
  52.  
  53. ChiSquare.c, given a sample from a chi square distribution with n degrees of freedom, returns the significance level at which a fit may be rejected.
  54.  
  55. Choose.c, uses the console to ask the user a multiple-choice question, accepting the shortest unambiguous response (with default), and printing out the whole choice. YesOrNo() and MultipleChoice() are obsolete, but retained for compatibility.
  56.  
  57. ChooseScreen.c asks the user to select a screen.
  58.  
  59. ConvolveX.c and ConvolveY allow convolution, vertically or horizontally, with an arbitrary one-dimensional point spread function. The source and destination Pixmaps may be the same or different, and may be the screen, so you can watch it happen. Try the demo Filter.
  60.  
  61. CopyBitsQuickly.c is a dumb substitute for CopyBits that ignores the color tables and palettes, simply copying pixels without any translation. It's for doing animations. Besides copying images, it can also add or multiply them. At one time it was much faster than CopyBits, but the latest timing (under System 7), by TimeVideo, indicates that CopyBits is now about as fast as CopyBitsQuickly. Most users will prefer to call the high-level CopyWindows. Try the demo Sandstorm.
  62.  
  63. CopyQuickDrawGlobals.c allows THINK C programs that use both the console and MacTraps to access the qd global structure.
  64.  
  65. CopyWindows.c provides a high-level interface to CopyBits and CopyBitsQuickly, accepting windows (WindowPtr, CWindowPtr, or GWorldPtr) instead of pixmaps or bitmaps. It accepts two windows, source and destination, figures out where the associated Pix/BitMaps are, and calls CopyBits or CopyBitsQuickly, after making all the appropriate incantations to get the desired results. HIGHLY RECOMMENDED!
  66.  
  67. DatedString.c creates a unique string representing the date and time, suitable as an extension for a data file name.
  68.  
  69. DrawPrintf.c does a sprintf and draws the characters into the current port, using the current font etc. Try the demo TestGDVideo.
  70.  
  71. ffprintf.c prints to two output streams, usually stdout and a file. It also saves and restores the port and GDevice.
  72.  
  73. FlushCacheRange.c, from Apple, provides a "machine-independent" way of flushing your processor's instruction and data caches. Cannot currently be compiled to run native on PowerPC.
  74.  
  75. fp.c temporarily provides some functions for the 68k equivalent to those defined by Apple in fp.h for the PowerPC. ldtox80(&xl,&x80) converts long double to extended80 (i.e. 10-byte double). x80told(&x80,&xl) converts extended80 to long double. fpclassify(x) tells you whether a double is a NAN, INF, etc.
  76.  
  77. GDInfo.c and GDInfoTime fill the user-supplied VideoInfo record with descriptive information about the video device.
  78.  
  79. GDInfo.h is a header file that defines the VideoInfo structure used by GDInfo.c, GDTestClut.c, and TimeVideo.c.
  80.  
  81. GDOpenWindow.c opens a full screen color window with an explicit palette on an arbitrary screen . GDDisposeWindow() closes the window and restores the screen's clut. AddExplicitPalette() adds a palette with all colors marked explicit to any color window or GWorld, allowing you to use PmForeColor or PmBackColor to designate the number you want to set pixels to when you use QuickDraw operations like EraseRect and DrawText. RemovePalette disposes of the palette. GetBitMapPtr(window) returns a pointer to the window's bitmap or pixmap. IsGWorldPtr(window) returns true only if window is a GWorldPtr. IsGrafPtr(window) returns true only if window is a GraftPtr, not a CGrafPtr. Try the demo Grating.
  82.  
  83. GDTestClut.c tests whether the video clut can be written and read faithfully, and saves the results in a user-supplied VideoInfo structure.
  84.  
  85. GDTime.c includes various routines that measure the timing of a video device. GDTimeClut measures how long it takes to load the clut. GDFrameRate measures the frame rate in Hz. GDVBLRate() measures the rate of VBL interrupts in Hz. GDMovieSize() measures what fraction of the screen you can fill with a real-time movie (a new image on each frame) using either CopyBitsQuickly or CopyBits to copy from memory to video card. Try the demo TimeVideo.
  86.  
  87. GDVideo.c allows you to control the video driver directly, bypassing QuickDraw. I consider this essential for controlling the lookup table of the video card.
  88. GDCardName(device) returns a C string containing the name of the video card.
  89. GDClutSize(device) returns the number of entries in the video driver's clut in the current video mode (i.e. current pixel size). VideoToolbox.h defines a preprocessor macro GDCLUTSIZE(device) that expands to equivalent inline code.
  90. GDColors(device) returns the number of colors, in the current video mode.
  91. GDDacSize(device) returns the number of bits in the video card's dac.
  92. GDDirectSetEntries(device,start,count,table) loads the clut, if pixels are 16 or 32 bits.
  93. GDGetEntries(device,start,count,table) reads the clut.
  94. GDGetGamma(device,gammaTblHandle) returns a pointer to the device's Gamma table.
  95. GDGetPageCnt(device,mode,&pages) tells you how many pages of video ram are available in any given mode.
  96. GDHasMode(device,mode,&pixelSize,&pages) tells you whether a particular video mode is supported by your video device.
  97. GDName(device) returns a Pascal string containing the name of the driver.
  98. GDNewLinearColorTable(device) returns a default table for use when pixelSize is 16 or 32 bits.
  99. GDPrintGammaTable().
  100. GDRestoreDeviceClut(device) works more reliably than Apple's RestoreDeviceClut.
  101. GDSaveGamma(device)/GDRestoreGamma(device) save/restore the driver's gamma-correction table. 
  102. GDSetEntries(device,start,count,table) loads the clut if pixels are 1 to 8 bits. Does a low-level setEntries Control call to the video card's driver, loading any number of clut entries with arbitrary rgb triplets. 
  103. GDSetEntriesByType(device,start,count,table) checks the device's gdType field
  104. and calls GDSetEntries, GDDirectSetEntries, or nothing, as appropriate.
  105. GDSetEntriesByTypeHighPriority(device,start,count,table) calls
  106. GDSetEntriesByType() while the processor priority has been temporarily raised to 7.
  107. GDSetGamma(device,gamma) loads a Gamma table into the specified video device. 
  108. GDSetMode(device,mode,page,&baseAddr) changes the video card's mode (i.e. pixelSize) and page.
  109. GDSetPageDrawn(device,page) selects which page of video memory will be used by future drawing operations. Untested.
  110. GDSetPageShown(device,page) selects which page of video memory we see. Untested.
  111. GDUncorrectedGamma(device) loads an identity matrix as the gamma-correction table. 
  112. GDVersion(device) returns the version number of the driver. 
  113. PatchMacIIciVideoDriver() fixes a bug in the Mac IIci built-in video driver.
  114. Try the demos TimeVideo and TestGDVideo. See "Video synch".
  115.  
  116. GetClicks.c waits for a mouse click, and determines whether it's a single, double, or triple click.
  117.  
  118. GetScreenDevice.c returns a handle to the n-th screen, where the MainDevice is the zero-th screen. n=GetScreenIndex(device) returns the inverse of GetScreenDevice(). slot=GetDeviceSlot(device) gets the "slot" for any screen device. device=SlotToScreenDevice(n) returns a handle to the screen device in slot n. device=GetWindowDevice(window) returns GDHandle of screen with largest intersection with the window's content. 
  119.  
  120. GetVersionString.c gets the application's version from its 'vers' resource.
  121.  
  122. GetVoltage.c reads a voltage from the Data Translation Analog to Digital Converter. This is used heavily by CalibrateLuminance, CheckContrast, and MeasureMTF. You may want to write an equivalent routine in order to use those programs with another Analog to Digital Converter.
  123.  
  124. HideMenuBar.c and SquareCorners(device) allow use of the whole screen. Try Grating.
  125.  
  126. Identify.c includes several functions, IdentifyCompiler(), IdentifyMachine(), IdentifyModel(), IdentifyOwner(), and IdentifyVideo(), that produce self explanatory text strings. Try the demos TimeCPU and TimeVideo.
  127.  
  128. ImageStatistics.c computes the minimum, maximum, mean, and mean square value of the pixels in a specified rect of a window or GWorld.
  129.  
  130. IsCmdPeriod.c accepts an event record and returns true or false, indicating whether the user has hit command period. Should work even on international systems that do keyboard remapping, but that has yet to be tested.
  131.  
  132. IsNan.c allows you to test whether your double variable contains a Not A Number code instead of a legal number. IsNan() returns the index (1 . . . 255) of the NAN, or zero if it's not a NAN. IsInf() returns -1 for -INF, +1 for +INF, and zero for not ±INF. The extra-fast macro IsFinite() returns 1 if your number is neither NAN nor ±INF.
  133.  
  134. kbhit.c and getcharUnbuffered() offer old-fashioned microcomputer-style unbuffered access to keystrokes.
  135.  
  136. Log2L.c quickly returns the (long) integer part of the log2 of a long integer argument.
  137.  
  138. Luminance.c provides for programming of the lookup table for gamma correction, and use of a video attenuator. Its theory of operation is described by Pelli and Zhang (1991). Documentation is in the Luminance.note file. Try the demos FlickerGrating and Filter.
  139.  
  140. Luminance.h is the header file for use with Luminance.c.
  141.  
  142. LuminanceRecord1.h is a sample "header" file produced by CalibrateLuminance.c for one of my monitors. It describes the gamma function and the gains of the three channels of the ISR Video attenuator. You should run CalibrateLuminance to make your own for each of your monitors.
  143.  
  144. MacMemory.h and MacMemory.c redefine the Standard C memory management calls (free,malloc,calloc,realloc) to use the Apple Memory Manager, bypassing Symantec THINK C's inefficient memory manager. You use them by adding the line "#include <MacMemory.h>" to your THINK C project prefix.
  145.  
  146. MakeNoise.c replaced by NoiseFill.c.
  147.  
  148. MaximizeConsoleHeight.c configures the THINK C and CodeWarrior consoles to open to the full height of your main screen. It also sets the default options of the CodeWarrior console to behave like the THINK C console.
  149.  
  150. mc68881.h defines MPW C's mc68881 and mc68020 preprocessor symbols for THINK C, so your programs can use them in "if" statements without worrying about which compiler you're using. The symbols are 1 (i.e. true) if the compiled code requires the chip (or better) and 0 otherwise.
  151.  
  152. Mean.c computes mean (and optionally the standard deviation) of an array of samples (either doubles, or signed or unsigned char, short, or long).
  153.  
  154. MoveMouse.c, from Apple, documents their new Cursor Device Manager.
  155.  
  156. Nan.c defines a global constant with the value NAN. (Defining NAN as (0.0/0.0) wastes runtime, and some environments, e.g. the THINK C Debbuger running on a PowerBook, have trouble evaluating 0.0/0.0.)
  157.  
  158.     error=NoiseFill(window,&rect,dx,dy,randomPhase); 
  159. NoiseFill.c fills the rect in the window with a random checkerboard, i.e. black & white checks, each dx pixels wide by dy pixels high. Random phase is optional. (dx and
  160. dy are doubles, and need not be integral. The noise is synthesized with 1-pixel
  161. checks and expanded by CopyBits, which is capable of expansion by non-integral
  162. amounts.) NoiseFillBits(pixmapPtr,&rect,dx,dy,randomPhase) is similar, but accepts a pix/bitmap ptr in place of the window. MakeNoise1(dx,dy,randomPhase,pixmapPtr)
  163. is obsolete, retained solely for compatibility. Try the demos Sandstorm and NoiseVBL.
  164.  
  165.     error=NoisePdfFill(world,&rect,pdfKind,&mean,&sd,min,max);
  166.     error=NoisePdfAdd(world,&rect,pdfKind,&mean,&sd,min,max);
  167. NoisePdfFill.c: Fast code to generate noise images. You supply a GWorld (or a window) and a rect indicating how much of it to fill with noise. (NoisePdfFill overwrites any pre-existing image; NoisePdfAdd adds to it.) Each pixel will get an independent (integer) sample from a specified probability density function (pdf): kBinaryPdf, kUniformPdf, kBinomialPdf, or kGaussianPdf. The specified pdf is clipped by the specified min and max, to preclude overflow in your image pixels.
  168.  
  169. Normal.c computes the probability density, cumulative distribution, and inverse cumulative distribution for the normal distribution. BoundedNormalIntegers(distribution,n,mean,sd,min,max) fills the "distribution" array with n ordered integers so that random samples from the array, i=distribution[nrand(n)] will be samples from a bounded normal distribution.
  170.  
  171. nrand.c, nrand(n) returns a random integer in the range [0,n-1]. 
  172.  
  173. OpenDataFile.c opens a parameter file for input and a data file for output. Output file name includes a time stamp, making it unique.
  174.  
  175. OpenPreferencesFolder.c opens the Preferences folder in the System Folder, creating it if necessary.
  176.  
  177. PixMapToPICT.c saves a section of a PixMap as a PICT file. Also see WindowToEPS.c, below. Try the demo Grating.
  178.  
  179. PixMapToPostScript.c will convert a grayscale image to a postscript file suitable for printing on a LaserWriter or Linotype. Most user will prefer to use the newer WindowToEPS, below.
  180.  
  181. PlotXY.c is handy for a quick screen plot, especially of incoming data. It plots one point at a time, and does lines, in eight colors, with optional dashing, and optional symbols. Used by MeasureMTF for online display.
  182.  
  183. PrintfExit.c prints out an error message and exits.
  184.  
  185. PrintfGWorld.c, for debugging, uses "printf" to print out the GWorld as a gross bitmap.
  186.  
  187. QD32Exists.c determines whether 32-bit QuickDraw has been installed. QD8Exists() determines whether color QuickDraw is present. NewPaletteManager() determines whether the new palette manager (documented in Inside Mac volume VI) is present. These routines have no significant advantage over Apple's Gestalt(), which came later.
  188.  
  189. randU.c is a fast 16-bit random number generator. randUL() returns a 32-bit random number. (The Standard C rand() provides only 15 bits.) RandFill() quickly fills a buffer of any size with random bits. Used by MakeNoise. Try the demos Sandstorm, NoiseVBL, and TimeCPU.
  190.  
  191. ReadLuminanceRecord.c interprets a LuminanceRecord?.h file at runtime.
  192.  
  193. ReadMATLABFile.c allows you to read and write MATLAB binary data files. MATLAB is a commercial application, sort of like BASIC rewritten by someone who likes linear algebra. ReadMATLABFile.c is based on code written by J.N. Little.
  194.  
  195. RectToAddress.c returns the memory address of the pixel in a PixMap or BitMap. It always works, dealing correctly with a whole slew of special configurations. Used by CopyBitsQuickly. GetPixBaseAddr32(PixMap **pm) returns the 32-bit address of the pixels/bits in a pix/bitmap. I suggest you call GetPixBaseAddr32 instead of Apple's GetPixBaseAddr(), which gave wrong results in early version of 32-bit quickdraw.
  196.  
  197. Require.c tests for any required fpu, cpu, and version of QuickDraw, and tests for consistent sizeof int among the header, program, and Standard C library, and notifies the user and exits gracefully if any requir%ment is unmet. All the demos call Require().
  198.  
  199. RestoreCluts.c restores the Color Lookup Tables of all screens, to clean up when your program is done.
  200.  
  201. Sane.c has been discarded. Use fp.c instead.
  202.  
  203. SetEntriesQuickly.c, written primarily by Raynald Comtois, Peter Lennie, and Bill Haake, quickly loads the clut of many popular video cards. Don't use this unless you have to, as it bypasses the video driver, making it extremely hardward dependent. For most video cards there is no reason to bypass the video driver. Try the demo TimeVideo.
  204.  
  205. SetFileInfo.c is a handy routine to set the creator and type of a file. The main use for this is to make data files of the correct type so that they can be double clicked and will open directly into the analysis program, typically Excel or Cricket Graph.
  206.  
  207. SetMouse.c moves the mouse. It complements the Apple-supplied GetMouse(). From THINKin' CaP, 1(2):28-29, Fall 1990.
  208.  
  209. SetOnePixel.c is obsolete; use SetPixelsQuickly instead, because it's ten times faster. The obsolete routines include GetOnePixel(), SetDevicePixel(), GetDevicePixel(), SetPixmapPixel(), GetPixmapPixel().
  210.  
  211. SetPixelsQuickly.c pokes or peeks a row of pixels, bypassing the color tables. This is the fastest way to get at the pixels in an image, for image processing or synthesis. All the routines work with both bitmaps and pixmaps and any size of pixel:1, 2, 4, 8, 16, or 32 bits. Try the demos Grating and FlickeringGrating.
  212.  
  213. SetPriority.c and SwapPriority() allow you to set the processor priority in order to prevent interrupts during something that you want to do as fast as possible, e.g. animations, and restore it later. Note that raising the processor priority will temporarily make the mouse and keyboard dead, because they are serviced by interrupts.
  214.  
  215. Shuffle.c reorders the elements of any array into a random sequence.
  216.  
  217. SndPlay1.c plays a sound asynchronously, i.e. it returns immediately, while the sound is still playing.
  218.  
  219. StringBounds.c counts, and computes the minimum bounding rectangle for, all the pixels that would be set black by calling DrawString with the given pascal string, in the current port's font, size, and style. StrBounds() does the same for a C string. CharBounds() does the same for a single char. StrOutlineLength and StringOutlineLength measure the outline length of a string, in pixels. 
  220.  
  221. StringToDateAndSecs.c reads date such as "6/30/91" and returns secs since 1/1/1904.
  222.  
  223. Timer.c is an interval timer based on Apple's Time Manager. PeekTimerSecs() and StopTimerSecs() return the elapsed time as a double, in seconds, since calling StartTimer(). PeekTimer() and StopTimer() return the time, as a long, in µs. Try the demos TimeCPU and TimeVideo.
  224.  
  225. TitleBarHeight.c returns the height of a window's title bar, in pixels.
  226.  
  227. TrapAvailable.c, from Apple, determines whether a particular trap is available.
  228.  
  229. TranslateLinefeeds.c, and TranslateLinefeeds.h, are for MATLAB projects. They help make THINK C code modules compatible with the MPW stdio library.
  230.  
  231. Uniform.c: UniformSample() returns a random sample from the interval [0.0,1.0).
  232.  
  233. VBLInstall.c implements a once-per-video-frame interrupt suitable for use with all video devices. Try the demo TimeVideo.
  234.  
  235. VideoTFB.c allows direct control of the original Apple color video card, which is no longer sold by Apple but is available for $90 from Shreve Systems (800-227-3971). I wrote it based on my disassembly of the Apple video driver. Don't use these routines unless you're prepared to live with the resulting hardware dependency. VideoTFB works with both the "Toby frame buffer card" and the "Mac II High-Resolution Video Card". Try the demos ScrollDemo and TimeVideo.
  236.  
  237. VideoToolbox.h is the header file that has the prototypes for all the VideoToolbox routines except those in Luminance.c (whose headers are in Luminance.h) and Sane.c. VideoToolbox.h also defines a variety of useful pre-processor macros. TRUE and FALSE. Numerical constants: INF, NAN, PI, LOGPI, LOG2, LOG10. GDCLUTSIZE(device) expands to fast inline code that yields the same answer as GDClutSize(device). Fixed point arithmetic: jf=LongToFix(j); j=FixToLong(jf); jf=DoubleToFix(a); a=FixToDouble(jf); StackGrow(n) increases the stack allocation by n bytes. You'll also want to use Apple's StackSpace(), declared in Memory.h, that returns the number of bytes allocated for the stack.
  238.  
  239. VLambda.c and VLambdaPrime(double nm) return the photopic and scotopic sensitivity of the standard CIE observer, relative to the peak at 555 or 507 nm. Based on Tables I(3.3.1) and I(4.3.2) in G. Wyszecki and W.S. Stiles (1982) Color Science, 2nd Ed., Wiley, New York.
  240.  
  241. WindowToEPS.c: saves the image in a window or GWorld to disk. Try the demo Grating.
  242.  
  243. Zoom.c implements a zoom box, i.e. if you click in the upper right hand corner of your window, in the little box-in-a-box icon, this code will expand the window to fill the screen with which it has the greatest intersection.
  244.  
  245.